<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <ul id="demo">
        <li>1</li><li>2</li><li>3</li><li>4</li><li>5</li><li>6</li>
    </ul>
    <script>
        document.addEventListener('click',function(e){
            e = e || window.event;//window.event是为了兼容IE
            var target = e.target || e.srcElement;//标准浏览器用ev.target，IE浏览器用event.srcElement
            if(target.nodeName.toLowerCase() === 'li'){
                console.log(target.innerHTML);
            }
        })
    </script>
</body>

</html>